import {BasicColumn} from '/@/components/Table';
import {FormSchema} from '/@/components/Table';
import { rules} from '/@/utils/helper/validator';
import { render } from '/@/utils/common/renderUtils';
import { getWeekMonthQuarterYear } from '/@/utils';
//列表数据
export const columns: BasicColumn[] = [
  {
    title: '底链名称',
    align: "center",
    dataIndex: 'dilanname'
  },
  {
    title: '底链类型',
    align: "center",
    dataIndex: 'dilantype_dictText'
  },
  {
    title: '底链图片',
    align: "center",
    dataIndex: 'dilanimg',
    customRender: render.renderImage,
  },
  {
    title: '排序',
    align: "center",
    dataIndex: 'dilanseq'
  },
  {
    title: '是否app显示',
    align: "center",
    dataIndex: 'isappshow',
    customRender:({text}) => {
       return  render.renderSwitch(text, [{text:'是',value:'1'},{text:'否',value:'0'}]);
     },
  },
  {
    title: '网址链接',
    align: "center",
    dataIndex: 'dilanurl'
  },
];

// 高级查询数据
export const superQuerySchema = {
  dilanname: {title: '底链名称',order: 0,view: 'text', type: 'string',},
  dilantype: {title: '底链类型',order: 1,view: 'list', type: 'string',dictCode: 'cms_dilian_types',},
  dilanimg: {title: '底链图片',order: 2,view: 'image', type: 'string',},
  dilanseq: {title: '排序',order: 3,view: 'number', type: 'number',},
  isappshow: {title: '是否app显示',order: 4,view: 'number', type: 'number',},
  dilanurl: {title: '网址链接',order: 5,view: 'text', type: 'string',},
};
